/**
 * Copyright 2002 Cordys R&D B.V. 
 * 
 * This file is part of the Cordys .NET Connector. 
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#if !defined(AFX_METADATA_H__INCLUDED_)
#define AFX_METADATA_H__INCLUDED_


//@Author	: Lejil 
//@Class	: MetaData
//
//	 Explores the .NET Assembly MetaData	
//		MetaData for Assembly 
//      MetaData for Classes   

#include "stdafx.h"

using namespace System::Reflection;
using namespace System::Collections;

__gc class MetaData
{
	public :
		MetaData(int request)
		{
			document = Node::GetDocument(request);
		}
		
		~MetaData()
		{
			delete document;
			document = NULL;
		}
		/**
		 *	 Method to be called for getting the metadata of all the methods
		 *		arguments 
		 *			1 . Name of the Assembly
		 *			2 .	Name of the class
		 *			3 .	Static or Not .If static read metaData of only static method
		 */
		int GetAllMethods(String *assemblyName,String *className,bool IsStatic);
		
		/**
		*	Method to be called for getting the metadata of all the classes 
		*						in an Assembly
		*		
		*/
		int GetAllClassesAndNamespace(String *assemblyName , String *nameSpace);

	private :
        Assembly*   LoadAssembly(String * assemblyName);  
		void		CreateMethodNode(int classNode,MethodInfo *method,ParameterInfo *param[]);
		int			CreateClassNode(int classesNode,String *nameSpace);
		
		String*     ConvertType(Type *dataType,String **defaultValue);
		Document   __gc  * document;
		
};

#endif